using UnityEngine;
// [Assembly-CSharp.dll].SafeAreaPanel
public class SafeAreaPanel : MonoBehaviour
{
    // Fields
    private UnityEngine.RectTransform _rectTransform;
    
    // Methods
    private void Awake()
    {
        this._rectTransform = this.GetComponent<System.Object>();
        UnityEngine.Rect val_2 = UnityEngine.Screen.safeArea;
        this.RefreshPanel(safeArea:  new UnityEngine.Rect() {m_XMin = val_2.m_XMin, m_YMin = val_2.m_YMin, m_Width = val_2.m_Width, m_Height = val_2.m_Height});
    }
    private void OnEnable()
    {
        SafeAreaDetection.SafeAreaDetection.SafeAreaChanged val_1 = 536900015;
        val_1 = new SafeAreaDetection.SafeAreaDetection.SafeAreaChanged(object:  this, method:  1610677429);
        SafeAreaDetection.add_OnSafeAreaChanged(value:  val_1);
    }
    private void OnDisable()
    {
        SafeAreaDetection.SafeAreaDetection.SafeAreaChanged val_1 = 536900015;
        val_1 = new SafeAreaDetection.SafeAreaDetection.SafeAreaChanged(object:  this, method:  1610677429);
        SafeAreaDetection.remove_OnSafeAreaChanged(value:  val_1);
    }
    private void RefreshPanel(UnityEngine.Rect safeArea)
    {
        UnityEngine.Vector2 val_1 = safeArea.m_XMin.position;
        UnityEngine.Vector2 val_2 = safeArea.m_XMin.position;
        UnityEngine.Vector2 val_3 = safeArea.m_XMin.size;
        safeArea.m_YMin = safeArea.m_YMin / (float)UnityEngine.Screen.height;
        float val_8 = safeArea.m_XMin / (float)UnityEngine.Screen.width;
        this._rectTransform.anchorMin = new UnityEngine.Vector2();
        float val_9 = safeArea.m_XMin + safeArea.m_XMin;
        float val_10 = safeArea.m_YMin + safeArea.m_YMin;
        val_9 = val_9 / (float)UnityEngine.Screen.width;
        val_10 = val_10 / (float)UnityEngine.Screen.height;
        this._rectTransform.anchorMax = new UnityEngine.Vector2();
    }
    public SafeAreaPanel()
    {
    
    }

}
